package com.zhijian.medical.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 荧光PCR类型枚举类
 *
 * @author HCG
 * @version 1.0
 * @date 2022/9/13
 */
@AllArgsConstructor
@Getter
public enum PcrTypeEnum {

    KNB(1, "KNB"),
    GW_HPV(2, "高危HPV"),
    JAK2(3, "JAK2"),
    FA_5(4, "肺癌5种"),
    PIK3CA(5, "PIK3CA"),
    COV(6, "新冠病毒");

    private Integer code;
    private String desc;

    public static PcrTypeEnum getByCode(Integer code) {
        PcrTypeEnum[] values = PcrTypeEnum.values();
        for (PcrTypeEnum anEnum : values) {
            if (anEnum.getCode().equals(code)) {
                return anEnum;
            }
        }
        return null;
    }
}
